/*
 * Copyright (c) 2022 iSoftStone Information Technology (Group) Co.,Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

const {
	http
} = uni.$u

//微信登录时保存用户
export const usersave = (params, config = {}) => http.post('/appletAppUserAdd', params, config)
//获取微信openid
export const getopenId = (params, config = {}) => http.post('/openId', params, config)
//用户登录/login
export const userLogin = (params, config = {}) => http.post('/loginByUsernameAndOpenId', params, config)
//通过微信openID获取用户信息/appletUserqueryByOpenId
export const getUserByOpenId = (params, config = {}) => http.get('/appletUserqueryByOpenId', {
	params: params
}, config)

//学生信息录入appletStudentadd
export const studentAdd = (params, config = {}) => http.post('/appletAppStudentAdd', params, config)
//学生信息编辑
export const studentEdit = (params, config = {}) => http.put('/appletAppStudentEdit', params, config)
//学生信息获取
export const getStudentByOpenId = (params, config = {}) => http.get('/appletStudentQueryByOpenId', {
	params: params
})
//学生审核信息编辑
export const studentCheckEdit = (params, config = {}) => http.put('/appletStudentCheckEdit', params, config)

//获取文章列表
export const getActricList = (params, config = {}) => http.post('/appletArticlequeryByPage', params, config)
//获取手机号
export const getPhone = (params, config = {}) => http.post('/getUserPhone', params, config)
//用户数据修改/appletUserEdit
export const userEdit = (params, config = {}) => http.post('/appletAppUserEdit', params, config)
//新增签到
export const signinAdd = (params, config = {}) => http.post('/appletSigninAdd', params, config)
//获取签到详情 appletSigninQueryById
export const getsiginbyId = (params, config = {}) => http.get('/appletSigninQueryById', {
	params: params
}, config)
//获取签到列表
export const getSiginList = (params, config = {}) => http.post('/appletSigninQueryByPage', params, config)

//消息通知
export const getNewsList = (params, config = {}) => http.post('/appletMessageQueryByPage', params, config)
//消息清空
export const delNewsList = (params, config = {}) => http.get('/appletMessageDeleteByOpenId', {params: params}, config)
//消息详情
export const getNewDetail = (params, config = {}) => http.get('/appletMessageQueryById', {params: params}, config)
//消息管理编辑
export const newListEdit = (params, config = {}) => http.put('/appletMessageEdit', params, config)


//新增关注/粉丝
export const fansAdd = (params, config = {}) => http.post('/addAppletConcern', params, config)
//获取粉丝列表
export const getfanslist = (params, config = {}) => http.post('/findAppletConcernList', params, config)
//delAppletConcern
export const delAppletConcern = (params, config = {}) => http.post('/delAppletConcern', params, config)
//文章详情
export const actriclook = (params, config = {}) => http.post('/appletArticlequeryById' , params, config)

//热门文章/appletArticlequeryTopByPage
export const getHostList = (params, config = {}) => http.post('/appletArticlequeryTopByPage', params, config)
//查询首屏/findResourcesList
export const getBannerList = (params, config = {}) => http.post('/findResourcesList', params, config)
//查询学院视频list
export const getVideoList = (params, config = {}) => http.post('/appletVideoQueryByPage', params, config)
///appletVideoQueryById
export const getVideoById = (params, config = {}) => http.get('/appletVideoQueryById', {params: params}, config)
///点赞转发收藏
export const articleChange = (params, config = {}) => http.post('/articleOperation', params, config)
///点赞转发收藏list
export const articleChangeList = (params, config = {}) => http.post('/appletArticleQueryCollection', params, config)

//活动列表appletActivityqueryByPage
export const getActiveList = (params, config = {}) => http.post('/appletActivityqueryByPage', params, config)
//活动列表appletActivityqueryByPage
export const getActiveById = (params, config = {}) => http.get('/appletActivityqueryById',  {params: params}, config)
//活动报名新增
export const addActiveSignUp = (params, config = {}) => http.post('/appletSignupadd',  params, config)
export const editActiveSignUp = (params, config = {}) => http.post('/appletSignupedit',  params, config)
//queryLeaderByArticleIdAndPhone获取队长信息
export const getActiveLeader = (params, config = {}) => http.post('/queryLeaderByArticleIdAndPhone',  params, config)
//活动报名审核编辑
export const appletSignupCheckEdit = (params, config = {}) => http.put('/appletSignupCheckEdit',params , config)
//通过活动id和报名人id查询单条数据
export const getRegistrateId = (params, config = {}) => http.post('/appletQueryByArticleIdAndUserId', params, config)
//待作品提交
export const addActiveWork = (params, config = {}) => http.post('/appletWorkadd', params, config)
//待作品提交编辑
export const editActiveWork = (params, config = {}) => http.put('/appletWorkedit', params, config)
//作品审核关联编辑
export const appletWorkCheckEdit = (params, config = {}) => http.put('/appletWorkCheckEdit',params , config)
//补签卡appletSigninUpdata
export const editSignin = (params, config = {}) => http.get('/appletSigninUpdata',{params:params} , config)

//获取积分列表
//补签卡appletSigninUpdata
export const getListIntegral = (params, config = {}) => http.post('/findAppletIntegralList',params , config)

//文章收藏列表appletArticleQueryCollection
export const getListCollection = (params, config = {}) => http.post('/appletArticleQueryCollection',params , config)
//获取签到管理数据
export const getShareByTime = (params, config = {}) => http.get('/findShareByTime',{params: params} , config)

//签到分享加积分

export const addAppletIntegral = (params, config = {}) => http.post('/addAppletIntegral',params , config)

/*通过openId和activityId获取作品详情appletWorkQueryOpenIdAndActivityId*/
export const getWorkByOpenId = (params, config = {}) => http.post('/appletWorkQueryOpenIdAndActivityId',params , config)
/* 开发板新增*/
export const addDevelop = (params, config = {}) => http.post('/appletDevelopmentBoardInsert',params , config)
/* 开发板获取详情*/
export const getDevelopByID = (params, config = {}) => http.post('/appletDevelopmentBoardByOpenIdAndActivityId',params , config)
/* 开发板编辑*/
export const editDevelop = (params, config = {}) => http.post('/appletDevelopmentBoardUpdate',params , config)
/* 开发板审核关联编辑 */
export const appletDevelopCheckEdit = (params, config = {}) => http.put('/appletDevelopmentBoardCheckEdit',params , config)

// 通过openID和activeID删除相关信息 appletDeleteCheck
export const deletCheck = (params, config = {}) => http.post('/appletDeleteCheck',params , config)
